/*
 * @Author: guojinxin_hub 1907745233@qq.com
 * @Date: 2024-09-04 15:13:48
 * @LastEditors: guojinxin_hub 1907745233@qq.com
 * @LastEditTime: 2024-09-04 15:54:15
 * @FilePath: \feidu-initialization-framework\src\stores\tools.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { defineStore } from 'pinia'

export const useToolsStore = defineStore({
  id: 'Tools',
  state: () => ({
    // 后期
    AnaphaseShow: false,
    // 页面UI展示
    UIShow: true,
    //   图层树展示
    LayerTreeShow: false,
    infotree: null,
    // 导览列表展示
    AnimationShow: false,
    // 天空盒展示
    SkyBoxShow: false,
    // 气象展示
    WeatherShow: false,
    // 建筑拆解展示
    BuildShow: false,
    // 拆楼信息保存
    Buildinfo: null,
    // 导览列表
    animationList: [],
  }),

  actions: {
    async SetAnaphaseShow(pyload: any) {
      this.$patch({
        AnaphaseShow: pyload,
      })
    },
    async SetUIShow(pyload: any) {
      this.$patch({
        UIShow: pyload,
      })
    },
    async SetLayerTreeShow(pyload: any) {
      this.$patch({
        LayerTreeShow: pyload,
      })
    },
    /**
     * 设置导览列表
     * @param animationList
     */
    setAnimationList(animationList: any) {
      this.$patch({
        animationList: animationList,
      })
    },
    async Setinfotree(pyload: any) {
      this.$patch({
        infotree: pyload,
      })
    },
    async SetAnimationShow(pyload: any) {
      this.$patch({
        AnimationShow: pyload,
      })
    },
    async SetSkyBoxShow(pyload: any) {
      this.$patch({
        SkyBoxShow: pyload,
      })
    },
    async SetWeatherShow(pyload: any) {
      this.$patch({
        WeatherShow: pyload,
      })
    },
    async SetBuildShow(pyload: any) {
      this.$patch({
        BuildShow: pyload,
      })
    },
    async SetBuildinfo(pyload: any) {
      this.$patch({
        Buildinfo: pyload,
      })
    },
  },
})
